/**
 *博尔信基础开发平台
 *<br> 版权声明：厦门博尔信软件有限公司版权所有,违者必究
 *<br> Copyright:  Copyright (c) 2012
 *<br> Company:pearlsoft
 *<br> @author 蒋勇华
 *<br> 2012-5-14
 *<br> @version 1.0
 *————————————————————————————————————
 *修改记录
 *    修改者：
 *    修改时间：
 *    修改原因：
 *——————————————————————————————————————
 */
package com.pearlsoft.webapp.rms.auditconfig.service;

import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.Date;

import com.pearlsoft.util.DateUtils;
import com.pearlsoft.webapp.core.dao.RecrodRowMapper;
import com.pearlsoft.webapp.core.dataset.Record;
import com.pearlsoft.webapp.core.dataset.SimpleRecord;

/**
 *描述： 
 *
 * 
 */
public class AuditConfigRowMapperHelper {
	public static RecrodRowMapper<Record> gridRowMapper(){
		return new  RecrodRowMapper<Record>(){
			@Override
			public Record mapRow(ResultSet rs, int rowNum)
					throws SQLException {				
				SimpleRecord recrod = new SimpleRecord();
				recrod.setValue("stepId", rs.getString(1));
				recrod.setValue("flowId", rs.getString(2));
				recrod.setValue("applyId", rs.getString(3));
				recrod.setValue("stepName", rs.getString(4));				
				recrod.setValue("startTime", rs.getDate(5)==null ?"":DateUtils.getTimeStr(new Date(rs.getTimestamp(5).getTime())));
				recrod.setValue("endTime", rs.getDate(6)==null ?"":DateUtils.getTimeStr(new Date(rs.getTimestamp(6).getTime())));
				recrod.setValue("stepstatus", rs.getString(7));				
				recrod.setValue("resName", rs.getString(8));	
				recrod.setValue("applyer", rs.getString(9));	
				return recrod;
			}
		};
	}
}
